<section class="scrollable padder-md" data-ng-controller="RouteChangeRequestListController">
    <div class="m-b-md">
        <h3 class="m-b-none text-black">
            <i class="fa fa-list m-r-sm"></i>路线修改申请
        </h3>
    </div>
    <!-- Toolbar 按钮栏 -->
    <section class="panel panel-default scrollable">
        <header class="panel-heading">
            <div class="row">
                <div class="col-sm-5">
                    <div class="od-head-title">路线修改申请列表</div>
                </div>
            </div>
        </header>
        <form class="form-inline" data-ng-submit="getObjList()">
            <div class="wrapper row">
                <div class="col-sm-12">
                    <div class="form-group">
                        <input type="text"
                               class="input-sm form-control"
                               data-ng-model="queryObj.driverName" placeholder="申请人">
                    </div>
                    <div class="form-group">
                        <input type="text"
                               class="input-sm form-control"
                               data-ng-model="queryObj.carNo" placeholder="车牌号">
                    </div>
                    <div class="form-group">
                        <input data-ng-model="queryObj.createTimeStart" class="input-sm form-control" type="text"
                               data-jss-datetimepicker="yyyy-mm-dd hh:ii" placeholder="申请开始时间"/>
                    </div>
                    <div class="form-group">
                        <input data-ng-model="queryObj.createTimeEnd" class="input-sm form-control" type="text"
                               data-jss-datetimepicker="yyyy-mm-dd hh:ii" placeholder="申请结束时间"/>
                    </div>
                    <div class="form-group">
                        <select data-required="true"
                                class="input-sm form-control"
                                data-ng-model="queryObj.state"
                                data-ng-options="state.value as state.name for state in getRequestStates()">
                            <option value="">全部</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <button class="form-control btn btn-sm btn-warning " type="submit">查询</button>
                    </div>
                </div>
            </div>
        </form>
        <!-- 表格部分 -->
        <div class="table-responsive">
            <table class="table table-striped b-t b-light">
                <thead>
                <tr>
                    <th>序号</th>
                    <th>申请人</th>
                    <th>车牌号</th>
                    <th>申请时间</th>
                    <th>【原】路线名</th>
                    <th>路线名</th>
                    <th>出发地</th>
                    <th>目的地</th>
                    <th>状态</th>
                    <th class="col-md-3">操作</th>
                </tr>
                </thead>
                <tbody>
                <tr data-ng-repeat="routeChangeRequest in routeChangeRequestList">
                    <td>{{(pagerObj.currentPage-1)*pagerObj.pageSize+$index+1}}</td>
                    <td>{{routeChangeRequest.driverName}}</td>
                    <td>{{routeChangeRequest.carNo}}</td>
                    <td>{{routeChangeRequest.createTime |date:'yyyy-MM-dd HH:mm:ss'}}</td>
                    <td>{{routeChangeRequest.orginRouteName || '还没设置'}}</td>
                    <td>{{routeChangeRequest.routeName}}</td>
                    <td>{{routeChangeRequest.routeStartSite}}</td>
                    <td>{{routeChangeRequest.routeDestSite}}</td>
                    <td>{{getStateName(routeChangeRequest.state)}}</td>
                    <td>
                        <a href="javascript:void(0);" class="text-primary m-r-xs"
                           data-ng-click="edit(routeChangeRequest.id)"><i class=""></i>查看</a>

                        <a href="javascript:void(0);" data-ng-if="routeChangeRequest.state == 0"
                           class="text-danger m-r-xs"
                           data-ng-click="faild(routeChangeRequest.id)">
                            <i class="glyphicon glyphicon-remove"></i>不通过
                        </a>
                        <a href="javascript:void(0);" data-ng-if="routeChangeRequest.state == 0"
                           class="text-success m-r-xs"
                           data-ng-click="complete(routeChangeRequest.id)"><i class="glyphicon glyphicon-ok"></i>通过</a>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>

        <!-- 分页控件 -->
        <footer class="panel-footer">
            <div data-ng-include="'comm/pager/pager.html'"></div>
        </footer>
    </section>
</section>
